<?php
/**
 * This is LilBlogs's route configuration file.
 *
 * Establish routes to LilBlogs's controllers and their actions.
 *
 * @copyright     Copyright 2008-2010, LilCake.net
 * @link          http://lilcake.net LilCake.net
 * @package       lil.plugins.lil_blogs
 * @subpackage    lil.plugins.lil_blogs.config
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 */
Router::parseExtensions('rss');

// make sure blog comments still get routed properly
Router::connect(
	'/lil_blogs/comments/add',
	array(
		'plugin'     => 'lil_blogs',
		'controller' => 'comments',
		'action'     => 'add'
	)
);

// route blog post id
Router::connect(
	'/lil_blogs/posts/:postid',
	array(
		'plugin'     => 'lil_blogs',
		'controller' => 'posts',
		'action'     => 'view'
	),
	array(
		'postid' => '[0-9]+'
	)
);

	// route post comments (rss)
Router::connect(
	'/lil_blogs/comments/:blog/:post',
	array(
		'plugin'     => 'lil_blogs',
		'controller' => 'comments',
		'action'     => 'index',
	)
);

// route blog comments (rss)
Router::connect(
	'/lil_blogs/comments/:blog',
	array(
		'plugin'     => 'lil_blogs',
		'controller' => 'comments',
		'action'     => 'index',
	)
);



// route blog short names
Router::connect(
	'/lil_blogs/:blog',
	array(
		'plugin'     =>'lil_blogs',
		'controller' => 'posts',
		'action'     => 'index'
	)
);

// route blog post short names
Router::connect(
	'/lil_blogs/:blog/:post',
	array(
		'plugin'     => 'lil_blogs',
		'controller' => 'posts',
		'action'     => 'view'
	)
);